package com.isias.system.Config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * @author 尹稳健~
 * @version 1.0
 * @time 2022/10/9
 */
@Component
@ConfigurationProperties(prefix = "wenjian")
public class WenJianConfig {
    /** 上传路径 */
    private static String profile;

    private static String url;

    public static String getProfile() {
        return profile;
    }

    public static String getUrl() {
        return url;
    }

    public void setProfile(String profile) {
        WenJianConfig.profile = profile;
    }

    public void setUrl(String url) {
        WenJianConfig.url = url;
    }

    /**
     * 获取导入上传路径
     */
    public static String getImportPath()
    {
        return getProfile() + "/import";
    }

    /**
     * 获取头像上传路径
     */
    public static String getAvatarPath()
    {
        return getProfile() + "/head/avatar";
    }

    /**
     *获取课程图片上传路径
     */
    public static String getCoursePicturePath(){
        return getProfile()+"/picture/course";
    }

    public static String getQuPicturePath(){
        return getProfile()+"/Qu";
    }

    /**
     *获取视频上传路径
     */
    public static String getVideoPath(){
        return getProfile()+"/video";
    }

    /**
     * 获取下载路径
     */
    public static String getDownloadPath()
    {
        return getProfile() + "/download/";
    }

    /**
     * 获取上传路径
     */
    public static String getUploadPath(){
        return getProfile() + "/upload";
    }
}

